package com.myproject.shop.service.impl;

import com.myproject.shop.domain.Staff;
import com.myproject.shop.mapper.StaffMapper;
import com.myproject.shop.service.IStaffService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class StaffServiceImpl implements IStaffService {


    @Autowired
        private StaffMapper staffMapper;

        @Override
        public List<Staff> selectAllStaff() {
            return staffMapper.selectAllStaff();
        }

        @Override
        public List<Staff> selectStaffByParam(String staffName) {
            return staffMapper.selectStaffByParam(staffName);
        }

        @Override
        public Staff selectStaffById(Integer sid) {
            return staffMapper.selectStaffById(sid);
        }

        @Override
        public int insertStaff(Staff staff) {
            return staffMapper.insertStaff(staff);
        }

        @Override
        public int updateStaff(Staff staff) {
            return staffMapper.updateStaff(staff);
        }

        @Override
        public int deleteStaffById(Integer sid) {
            return staffMapper.deleteStaffById(sid);
        }
    }

